From 1fd541ddc7fd0604d97ae7eea11840e130afc776 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Thu, 19 Mar 2026 22:41:13 +0100 Subject: [PATCH] croco: Remove set-but-unused variables Theses variables are set, but never read. That's not very useful, and gcc now warns about them by default (-Wunused-but-set-variable). Part-of: --- src/st/croco/cr-input.c | 4 +--- src/st/croco/cr-parser.c | 8 -------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/st/croco/cr-input.c b/src/st/croco/cr-input.c index 430e75ed8..170d8d971 100644 --- a/src/st/croco/cr-input.c +++ b/src/st/croco/cr-input.c @@ -200,8 +200,7 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc) FILE *file_ptr = NULL; guchar tmp_buf[CR_INPUT_MEM_CHUNK_SIZE] = { 0 }; gulong nb_read = 0, - len = 0, - buf_size = 0; + len = 0; gboolean loop = TRUE; guchar *buf = NULL; @@ -243,7 +242,6 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc) buf = g_realloc (buf, len + CR_INPUT_MEM_CHUNK_SIZE); memcpy (buf + len, tmp_buf, nb_read); len += nb_read; - buf_size += CR_INPUT_MEM_CHUNK_SIZE; } } diff --git a/src/st/croco/cr-parser.c b/src/st/croco/cr-parser.c index d4f40cf1d..3f1b36c9a 100644 --- a/src/st/croco/cr-parser.c +++ b/src/st/croco/cr-parser.c @@ -3028,7 +3028,6 @@ cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr) CRTerm *expr = NULL, *expr2 = NULL; guchar next_byte = 0; - gulong nb_terms = 0; g_return_val_if_fail (a_this && PRIVATE (a_this) && a_expr, CR_BAD_PARAM_ERROR); @@ -3046,12 +3045,6 @@ cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr) 1, &next_byte); if (status != CR_OK) { if (status == CR_END_OF_INPUT_ERROR) { - /* - if (!nb_terms) - { - goto error ; - } - */ status = CR_OK; break; } else { @@ -3086,7 +3079,6 @@ cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr) expr = cr_term_append_term (expr, expr2); expr2 = NULL; operator = 0; - nb_terms++; } if (status == CR_OK) { -- 2.39.5